package core

import (
	"fmt"
	"os"
	"path/filepath"
)

func createJavaProjectStructure(basePath string, selectedDirs []string) error {
	for _, dir := range selectedDirs {
		path := filepath.Join(basePath, "src", dir)
		if err := os.MkdirAll(path, os.ModePerm); err != nil {
			return err
		}
		fmt.Printf("Created: %s\n", path)
	}
	return nil
}

func writeFiles(files map[string]string) {
	for filename, content := range files {
		os.WriteFile(filename, []byte(content), 0644)
		fmt.Printf("Wrote file: %s\n", filename)
	}
}
